<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>{$second_menu.module_name} - 微商来 - 让更多的人帮你卖货！</title>
    <link rel="stylesheet" href="PLATFORM_NEW_LIB/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="PLATFORM_STATIC/css/common.css?t=1.2">
    <link rel="stylesheet" href="PLATFORM_NEW_CSS/platform.css?t=1.1">
    <link rel="shortcut icon" href="PLATFORM_IMG/logo.png" type="image/x-icon" />
    <script>
        var PLATFORMJS = "PLATFORM_NEW_JS";
    </script>
    <script type="text/javascript" src="PLATFORM_NEW_LIB/require.js"></script>
    <script type="text/javascript" src="PLATFORM_NEW_JS/time_common.js"></script>
    <script type="text/javascript" src="PLATFORM_NEW_JS/common.js"></script>
    <script type="text/javascript" src="PLATFORM_NEW_JS/jquery.min.js"></script>
    <script type="text/javascript" src="PLATFORM_NEW_JS/jquery-migrate-1.2.1.min.js"></script>
    <script type="text/javascript" src="PLATFORM_NEW_JS/config.js"></script>
    {include file="platform/controlCommonVariable" }
    {include file="platform/urlModel"}
    {block name="resources"}{/block}
    <!--[if IE]>
	<script src='https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv-printshiv.min.js'></script><script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
	< ![endif]-->
</head>
<body>
<div class="v-layout {if !$second_menu_list} nosubnav {/if}">
    <div class="v-sidebar">
        <!--导航-->
        <div class="v-nav">
            <!--<a class="v-logo" href="/" title=""><img src="PLATFORM_STATIC/images/logo.png"></a>-->
            <ul class="v-nav-list">
                {if $nav_list}
                {volist name="nav_list" id="vo"}
                {if $vo['data']['icon_class']=='icon-application-color' && !in_array($vo['data']['module_id'],$addons_sign_module)}
                <li><a href="{:__URL('PLATFORM_MAIN/'.$vo['data']['url'])}" class='item  {if condition="$vo['data']['module_id'] eq $headid"}active{/if}' title=""><span class="icon-application-color"><span class="path1"></span><span class="path2"></span><span class="path3"></span><span class="path4"></span><span class="path5"></span></span>&nbsp;{$vo['data']['module_name']}</a></li>
                {else if !in_array($vo['data']['module_id'],$addons_sign_module)}
                <li ><a href="{:__URL('PLATFORM_MAIN/'.$vo['data']['url'])}" class='item {if condition="$vo['data']['is_menu'] eq 0"}hide{/if}   {if condition="$vo['data']['module_id'] eq $headid"} active {/if}' title=""><i class="icon {if $vo['data']['icon_class']}{$vo['data']['icon_class']}{else} icon-home {/if}"></i>&nbsp;{$vo['data']['module_name']}</a></li>
                 {/if}
                {/volist}
                {/if}
            </ul>
        </div>
        {block name="menu"}
        {if $second_menu_list}
        <div class="v-subnav">

            {volist name="nav_list" id="vo"}
            {if !in_array($vo['data']['module_id'],$addons_sign_module)}
            {notempty name="vo['sub_menu']"}
            <ul class="v-subnav-list {if condition="$vo['data']['module_id'] eq $headid"}block{else}hide{/if}" id="menu_{$vo['data']['module_id']}" >
            {volist name="vo['sub_menu']" id="v1"}
            {if !in_array($v1['module_id'],$addons_sign_module)}
            <li>
                <a href="{:__URL('PLATFORM_MAIN/'.$v1['url'])}"  {if strtoupper($v1['method']) eq strtoupper($action) || $v1['module_id'] eq $pid } class="item active"{else} class="item"{/if}> {$v1['module_name']}</a>
            </li>
            {/if}
            {/volist}
            </ul>
            {/notempty}
            {/if}
            {/volist}
        </div>
        {/if}
        {/block}
    </div>
    {block name="header"}
{if $no_menu == '1'}

{else}
<div class="v-header">
        <div class="v-header-box">
            {if $second_menu.module_name=='首页'}
            <div class="v-header-title">
                <img src="/public/platform/images/logo2.png" class="v-header-img">
                {if $web_info['mall_name']}
                <span style="font-weight: bold;font-size: 18px;padding: 0 3px">{$web_info['mall_name']}</span>
                {else}<span style="font-weight: bold;font-size: 18px;padding: 0 3px">{$web_info['title']}</span>{/if} 
                <span class="btn-version btn-primary versionPr" id="versionPr">
                    {$web_info['version']}
                </span>
            </div>
            {else}
            <div class="v-header-title">
                <img src="/public/platform/images/logo2.png" class="v-header-img">
                {if $web_info['mall_name']}
                <span style="font-weight: bold;font-size: 18px;padding: 0 3px">{$web_info['mall_name']}</span>
                {else}<span style="font-weight: bold;font-size: 18px;padding: 0 3px">{$web_info['title']}</span>{/if} 
                <span class="btn-version btn-primary versionPr" id="versionPr">
                    {$web_info['version']}
                 </span> 
                </div>
            {/if}
            <div class="v-header-account">

                <div class="user-menu fs-12">



                    <div class="inline-block">
                        <a href="{:__URL('PLATFORM_MAIN/index/preview')}" class="previewIndex" target="_blank">预览</a>
                    </div>

                    <div class="inline-block newsTips shortcutBar">
                        <a href="javascript:void(0);" id="news-tips" class="dker clear-cache" style="position: relative">
                            <span><i class="icon icon-message3"></i></span> 
                            <span class="badge pa tip0"></span>
                        </a>
                        
                        <div class="dropdown-menu" aria-labelledby="news-tips">
                            <ul class="newsTips_ul">
                                <li class="no_count hide">暂无待办信息</li>
                                <li class="dai_count hide"><a href="{:__URL('PLATFORM_MAIN/order/orderlist')}?order_status=1" class="flex flex-pack-justify"><div>待发货订单</div><div class="text-red tip2"></div></a></li>
                                <li class="after_count hide"><a href="{:__URL('PLATFORM_MAIN/order/afterorderlist')}" class="flex flex-pack-justify"><div>售后订单</div><div class="text-red tip3"></div></a></li>
                                <li class="mail_count hide"><a href="{:__URL('PLATFORM_MAIN/Mail/mailList')}" class="flex flex-pack-justify"><div>站内信</div><div class="text-red tip4"></div></a></li>
                                <li class="cms_count hide"><a href="{:__URL('PLATFORM_MAIN/Mail/cmsList')}" class="flex flex-pack-justify"><div>公告</div><div class="text-red tip5"></div></a></li>
                            </ul>

                        </div>
                    </div>
                    <div class="layout-user inline-block">
                        <div class="ivu-dropdown">
                            <div class="ivu-dropdown-rel">
                                <a href="javascript:void(0)" class="text-primary"><img src="/public/platform/images/index/22.png" class="avatar">
                                    {if $username}{$username}{else}{$web_info['user_tel']}{/if}
                                    <span class="caret"></span>
                                </a>
                            </div>
                            <div class="dropdown-menu qqqq">
                                <div class="ivu-dropdown-menu user-dropdown">
                                    <div class="infos">
                                        <div class="row">
                                            <div class="col-md-3">
                                               <a class="avatar"><img src="/public/platform/images/index/22.png"></a>
                                            </div>
                                            <div class="col-md-9">
                                                <p class="names">{if $username}{$username}{else}{$web_info['user_tel']}{/if}</p>
                                                <p class="names updateUser"><span id="updateUser">{if $web_info['title']}{$web_info['title']}{else}未设置公司名称{/if}</span> <a href="javascript:void(0);" class="text-primary" style="margin-left: 6px">修改</a></p>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="operations flex">
                                        <a href="{:__URL('PLATFORM_MAIN/Addonslist/incrementOrderList')}" target="_blank"><i class="icon icon-order1 mr-10"></i>订购列表</a>
                                        {if $auth_status}
                                        <a href="{:__URL('PLATFORM_MAIN/Auth/userlist')}"><i class="icon icon-account3 mr-10"></i>子账号列表</a>
                                        {/if}
                                        <a href="http://bbs.vslai.com.cn/plugin.php?id=workorder" target="_blank"><i class="icon icon-list mr-10"></i>工单管理</a>
                                        <a href="javascript:void(0);" class="updatePass"><i class="icon icon-password3 mr-10"></i>修改密码</a>
                                    </div>
                                    <div class="operations flex">
                                        <a href="javascript:void(0);" class="delcache"><i class="icon icon-clear mr-10"></i>清除缓存</a>
                                        <a href="{:__URL('PLATFORM_MAIN/Login/logout')}"><i class="icon icon-logout-l mr-10"></i>退出登录</a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>


                </div>
            </div>
        </div>
    </div>
{/if}
{/block}
    <div class="v-main">
        <div class="v-container">
            {if $second_menu.desc neq ''}
            <div class="alert alert-tips alert-dismissible" role="alert">
                <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                {$second_menu.desc}
                {if $second_menu.jump neq ''}
                <a href="{$second_menu.jump}" class="alert-link" target="_blank">&nbsp;查看详情</a>
                {/if}
            </div>
            {/if}
            {block name="main"}
            {/block}
        </div>
        <div class="copyrights"><a href="http://q.url.cn/s/EPvXzVm" target="_blank" class="text-primary">在线客服</a> | Copyright©2012-2019 微商来. All Rights Reserved 网站备案号：粤ICP备14084496号</div>
    </div>

</div>
    <script>
        require(['util','kefu'],function(util,kefu){
          // ie浏览器判断
            function isIE() {
                if (!!window.ActiveXObject || "ActiveXObject" in window){
                    location.href=__URL(PLATFORMMAIN+'/login/versionLow');
                }else{
                    
                }
            }
            isIE();

            $(".newsTips").hover(function(){
                $(this).addClass("open");
            },function(){
                $(this).removeClass("open");
            });


            // 修改密码
            $('.updatePass').on('click',function(){
                    var html = '<form class="form-horizontal padding-15" id="">';
                    html += '<div class="form-group"><label class="col-md-3 control-label"><span class="text-bright">*</span>原密码</label><div class="col-md-8"><input type="password" id="pass" class="form-control"  /></div></div>';
                    html += '<div class="form-group"><label class="col-md-3 control-label"><span class="text-bright">*</span>新密码</label><div class="col-md-8"><input type="password" id="pass_new" class="form-control"  /></div></div>';
                    html +='<div class="form-group"><label class="col-md-3 control-label"><span class="text-bright">*</span>确认密码</label><div class="col-md-8"><input type="password" id="pass_new_real" class="form-control"  /></div></div>';
                    html += '</form>';
                    util.confirm('修改密码',html,function(){
                        var pass = this.$content.find('#pass').val();
                        var pass_new = this.$content.find('#pass_new').val();
                        var pass_new_real = this.$content.find('#pass_new_real').val();
                        if(pass==''){
                            util.message('原密码不能为空','danger');
                            this.$content.find('#pass').focus();
                            return false;
                        }
                        if(pass_new==''){
                            util.message('新密码不能为空','danger');
                            this.$content.find('#pass_new').focus();
                            return false;
                        }
                        if(pass_new_real==''){
                            util.message('确认密码不能为空','danger');
                            this.$content.find('#pass_new_real').focus();
                            return false;
                        }
                        if(pass_new!=pass_new_real){
                            util.message('新密码和确认密码不一致','danger');
                            this.$content.find('#pass_new_real').focus();
                            return false;
                        }
                        $.ajax({
                            type : "post",
                            url : "{:__URL('PLATFORM_MAIN/Auth/resetUserPassword')}",
                            data : {
                                "pass" : pass,
                                "pass_new" : pass_new
                            },
                            success : function(data) {
                                if (data["code"] > 0) {
                                    util.message(data["message"],'success');
                                }else{
                                    util.message(data["message"],'danger');
                                }
                            }
                        });
                    })
                })
            // 个人信息
            $('.updateUser').on('click',function(){
                var html = '<form class="form-horizontal padding-15" id="">';
                if("{$user_info['is_system']}" == "1"){
                    html += '<div class="form-group"><label class="col-md-3 control-label">公司名称</label><div class="col-md-8"><input type="text" id="user_name" class="form-control" value="{$web_info[\'title\']}" /></div></div>';
                }else{
                    html += '<div class="form-group"><label class="col-md-3 control-label">公司名称</label><div class="col-md-8">{$web_info[\'title\']}</div></div>';
                }
                html += '</form>';
                util.confirm('账号信息',html,function(){
                        var user_name = this.$content.find('#user_name').val();
                        if(user_name==''){
                            util.message('公司名称不能为空','danger');
                            this.$content.find('#user_name').focus();
                            return false;
                        }
                        $.ajax({
                            type : "post",
                            url : "{:__URL('PLATFORM_MAIN/Auth/modifyUserName')}",
                            data : {
                                "user_name" : user_name
                            },
                            success : function(data) {
                                if (data["code"] > 0) {
                                    $('#updateUser').html(user_name);
                                    util.message(data["message"],'success');
                                }else{
                                    util.message(data["message"],'danger');
                                }
                            }
                        });
                })
            })
            $('.delcache').click(function (e) {
                $.ajax({
                    url : __URL(PLATFORMMAIN+"/System/deleteCache"),
                    type : "post",
                    data : {},
                    success : function(data) {
                        if (data) {
                            util.message('缓存更新成功', 'success',location.reload());
                        } else {
                            util.message('缓存更新失败', 'danger');
                        }
                    }
                });
            })
        })
        function loading(){
            $.ajax({
                type: "post",
                url: "{:__URL('PLATFORM_MAIN/index/tipCount')}",
                async: true,
                success: function (data) {
                    var total_tips=data['total_tips']>100?"99+":data['total_tips'];
                    $(".tip0").html(total_tips);
                    if(data['total_tips']>0){
                        $(".no_count").addClass('hide');
                    }else{
                        $(".no_count").removeClass('hide');
                    }
                    if(data['daifahuo']>0){
                        $(".dai_count").removeClass('hide');
                        $(".tip2").html(data['daifahuo']);
                    }
                    if(data['tuikuanzhong']>0){
                        $(".after_count").removeClass('hide');
                        $(".tip3").html(data['tuikuanzhong']);
                    }
                    if(data['unread']>0){
                        $(".mail_count").removeClass('hide');
                        $(".tip4").html(data['unread']);
                    }
                    if(data['uncms']){
                        $(".cms_count").removeClass('hide');
                        $(".tip5").html(data['uncms']);
                    }
                }
            });
        }
        loading();
    </script>
    {block name="script"}
    {/block}

</body>
</html>

